home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / utility / dirco609.zip / DIRCOMP.DOC < prev    next >
Text File  |  1996-09-16  |  13KB  |  276 lines

  1. DIRCOMP.DOC                          1                         Revised: 09-16-96
  2.  
  3. DIRCOMP compares subdirectories and  looks  for  dissimilarities  between  files
  4. (different sizes or creation dates as well as missing files). You can  have  the
  5. command copy files from the first subdirectory to the  output  subdirectory.  In
  6. some ways, this is similar to the XCOPY and REPLACE commands in DOS except there
  7. are a number of enhancements which make DIRCOMP ideal  for  network  maintenance
  8. work.  These features include:
  9.  
  10.   * You can specify that the command copy only unmatched files (something
  11.     that can't be done using XCOPY).
  12.   * You can specify that the command process child subdirectories as well
  13.     (something that can't be done using REPLACE).
  14.   * You can delete the files which are in the destination subdirectory but
  15.     not in the source subdirectory.
  16.   * You can specify up to 10 file exclusion or file inclusion specifications.
  17.   * DIRCOMP produces a disk report called (by default) C:\DIRCOMP.TXT showing
  18.     the dissimilarities.
  19.   * DIRCOMP can move the files instead of copy them, effectively allowing you
  20.     to prune and graft directory structures.
  21.   * The date format shown is based on your country setting.
  22.  
  23. To reduce the risks inherent  in  this  sort  of  automatic  execution,  neither
  24. /UPDATE or /KILL are available if the secondary subdirectory is a network  drive
  25. unless the "/NET" option is passed in.
  26.  
  27. DIRCOMP is typically used in the process of backing up files from one  drive  to
  28. another.  DIRCOMP allows you to easily copy  every  file  and  get  rid  of  now
  29. non-existant files.
  30.  
  31. Most people who report using DIRCOMP  say  they  use  the  program  to  maintain
  32. workstations in a networked environment.  They take the  files  from  a  network
  33. directory and use them to replace the files on the workstation.
  34.  
  35. Note that DOS includes a command called REPLACE which will do some of  the  same
  36. things that this utility does.  The central differences are that  REPLACE  won't
  37. delete mismatched files and it doesn't  produce  a  report  on  inconsistencies.
  38. REPLACE also doesn't have the ability to handle  odd  attributes  or  deal  with
  39. cascading subdirectories.  REPLACE *is* a lot quicker though.
  40.  
  41. WIN95 AND WINNT NOTICE:  As with most DOS-based utilities, this program  doesn't
  42. understand the weird subdirectories, long filenames, invalid characters that are
  43. possible under Windows 95 and Windows/NT.   If  you're  in  non-compatible  file
  44. mode, the program may not work correctly.
  45.  
  46.  
  47. DIRCOMP.DOC                          2                         Revised: 09-16-96
  48.  
  49. Specifying parameters:
  50.  
  51. Parameters for this program can be set in the following ways.  The last  setting
  52. encountered always wins:
  53.   - Read from an *.INI file (see BRUCEINI.DOC file),
  54.   - Through the use of an environmental variable (SET DIRCOMP=whatever), or
  55.   - From the command line (see "Syntax" below)
  56.  
  57.  
  58. Syntax:
  59.  
  60.     DIRCOMP directory1 directory2 [ /S ] [ /CREATE ] [ /Xfilespec ]...
  61.       [ /Nfilespec ]... [ /UPDATE ] [ /KILL ] [ /-A ] [ /-U ]
  62.       [ /CLONE ] [ /MOVE ] [ /ATTR=[H][S][R] ] [ /NET ]
  63.       [ /F | /Frptfile | /-F ] [ /OVERWRITE | /APPEND | /-OVERWRITE | /OVERASK ]
  64.       [ /ALL ] [ /Tpath ] [ /COLOR=nnn | /MONO ] [ /Q ]
  65.       [ /Iinitfile | /-I ] [ /? ]
  66.  
  67. where:
  68.  
  69. "directory1" is the name of the primary (source) subdirectory.   If  /UPDATE  is
  70. used, the secondary subdirectory's contents will be changed to reflect the  ones
  71. here.
  72.  
  73. "directory2" is the name of the secondary subdirectory  which  will  have  files
  74. copied to it or deleted from it.
  75.  
  76. "/S" goes through and processes subdirectories off  of  the  subdirectories  you
  77. specified in a cascading manner.   You  can  use  this  option  to  copy  entire
  78. directory trees if you want.  Still requires /UPDATE if you want it to  actually
  79. do anything besides report on conditions of course.   The  program  may  not  be
  80. smart enough to delete all embedded subdirectories.   "/-S"  (the  opposite)  is
  81. initially the default.
  82.  
  83. "/CREATE" will create directory2 if it doesn't exist already.   "/-CREATE"  (the
  84. opposite) is initially the default.
  85.  
  86. "/Xfilespec" says to exclude certain filespecs from being considered..  You  can
  87. specify up to 10 exclusion parameters but each must have  their  own  /Xfilespec
  88. statement.  For example, to exclude all files with a CFG  extension,  you  could
  89. say "DIRCOMP (other parms) /X*.CFG".
  90.  
  91. "/Nfilespec" says to include certain  filespecs.   You  can  specify  up  to  10
  92. inclusion parameters but each must have their own /Nfilespec  statement.   Files
  93. have to meet this filespec filter in order to be considered.   For  example,  to
  94. only update EXE and COM files, you could  say  "DIRCOMP  (other  parms)  /I*.EXE
  95. /I*.COM".
  96.  
  97. "/UPDATE" says to copy any files from directory1 to directory2 which are  either
  98. (a) newer in directory1 (unless /-U specified) or (b) not in directory2  at  all
  99. (unless /-A specified).  Unless /CLONE is specified, files will *NOT* be  copied
  100. if (a) the directory2 files are more recent or  (b)  file  sizes  are  the  only
  101. difference.  "/-UPDATE" (the opposite) is initially the default.
  102.  
  103.  
  104. DIRCOMP.DOC                          3                         Revised: 09-16-96
  105.  
  106. "/KILL" says to delete any files in directory2 which are not in directory1.   It
  107. will also delete any empty subdirectories in directory2 (whether they were empty
  108. off directory1 or not).  /KILL automatically  invokes  /UPDATE.   "/-KILL"  (the
  109. opposite) is initially the default.
  110.  
  111. "/-A" says to copy files only if they are already in the output directory.  This
  112. is the opposite of the /A (add) function which is initially the default.   "/-A"
  113. used in combination with "/-U" would exclude all files from consideration and is
  114. not allowed.
  115.  
  116. "/A" copies files even if they do not exist already  in  the  output  directory.
  117. Unlike with DOS's REPLACE command, "/A" and "/U"  are  not  mutually  exclusive.
  118. "/A" is initially the default.
  119.  
  120. "/-U" says to copy files only if  they  do  not  exist  already  in  the  output
  121. directory.  This is the opposite of the /U (update) function which is  initially
  122. the default.  "/-U" used in combination with "/-A" would exclude all files  from
  123. consideration and is not allowed.
  124.  
  125. "/U" copies files even if they already exist in the  output  directory.   Unless
  126. /CLONE is specified, only files which are newer in the source subdirectory  will
  127. be copied.  Unlike with DOS's REPLACE command, "/A" and "/U"  are  not  mutually
  128. exclusive.  "/U" is initially the default.
  129.  
  130. "/CLONE" says to copy all files from directory1 to directory2 even if the  files
  131. in directory2 are more recent than those in  directory1.   /CLONE  automatically
  132. invokes /UPDATE.  "/-CLONE" (the opposite) is initially the default.
  133.  
  134. "/MOVE" says to move the files instead  of  copying  them.   This  deletes  from
  135. directory1 any file that was copied to directory2.  (The deletion is  done  only
  136. if the initial copy succeeded.) Typically, the option  is  used  in  combination
  137. with  the  /CLONE  option.   Since  this  option  is  kind  of  scarey  if  used
  138. incorrectly, you have to specify /UPDATE as well in order to use  it.   "/-MOVE"
  139. (the opposite) is initially the default.
  140.  
  141. "/ATTR=[H][S][R]" allows you to specify a combination  of  attributes  that  you
  142. want considered.  Normally, hidden, system, and read-only files are  ignored  by
  143. the routine.  Using /ATTR, you can include whatever you  want.   /ATTR=HSR,  for
  144. example, gets them all.
  145.  
  146. "/NET" removes a restriction which does not allow the secondary directory to  be
  147. a network drive.  Note that the test the program performs for this  is  somewhat
  148. imperfect and it may not notice that it's actually a  networked  drive.   Sorry!
  149. "/-NET" (the opposite) is initially the default.
  150.  
  151. "/F" says to create a report file named C:\DIRCOMP.TXT which shows  what  action
  152. was taken.  "/F" is, in fact, the  same  as  entering  "/FC:\DIRCOMP.TXT".   The
  153. default is initially to create no report at all ("/-F").
  154.  
  155. "/Frptfile" provides  the  name  of  the  report  file  to  create.   Specifying
  156. "/FSCRN:" will send the report to the  screen.   The  default  is  initially  to
  157. create no report at all ("/-F").
  158.  
  159. "/-F" skips the creation of the report file.  This is initially the default.
  160.  
  161.  
  162. DIRCOMP.DOC                          4                         Revised: 09-16-96
  163.  
  164. "/OVERWRITE" says to overwrite the report file if it's already there.
  165.  
  166. "/APPEND" says to append to the end of any existing report file.
  167.  
  168. "/-OVERWRITE" says to abort if the output file exists already.
  169.  
  170. "/OVERASK" says to prompt if the  output  file  exists  already.   This  is  the
  171. default.
  172.  
  173. "/ALL" says to write all files to the report  file  (typically  C:\DIRCOMP.TXT),
  174. not just the ones that have differences.  "/-ALL" (the  opposite)  is  initially
  175. the default.
  176.  
  177. "/Tpath" specifies where to write the temporary  ISAM  files  that  the  routine
  178. needs.  ISAM data bases are used to store and sort the file names.   ISAM  files
  179. cannot be created reliably on certain types of drives.  Examples are "/TC:"  and
  180. "/TC:\TEMP".  If not specified, the routine writes to the following in sequence:
  181.  
  182.   - the value of any TEMP, then TMP, environmental variable
  183.   - C:\TEMP
  184.   - C:\
  185.  
  186. "/COLOR=nnn" specifies the default color settings to use.  The setting must must
  187. consist of three digits, the first two being the foreground color and  the  last
  188. being the background color.  The foreground color should be padded on  the  left
  189. with a 0 if it is only one digit in length.  Defaults to "COLOR=071"  (white  on
  190. blue).
  191.  
  192. Foreground colors:
  193.  
  194.         Low intensity           High intensity
  195.  
  196.         0 = black                8 = dark grey
  197.         1 = blue                 9 = light blue
  198.         2 = green               10 = light green
  199.         3 = cyan                11 = light cyan
  200.         4 = red                 12 = light red
  201.         5 = magenta             13 = light magenta
  202.         6 = brown               14 = light yellow
  203.         7 = white               15 = bright white
  204.  
  205. Adding 16 to any color will make the text blink.  Background colors can  consist
  206. of 0 to 7 above.  Bright white on blue, for example, would be "151".  Note  that
  207. the program automatically adds 8 to the settings periodically  for  emphasis  so
  208. setting  the  default  color  to  be  high  intensity  will  actually  make  the
  209. deliberately highlighted  text  blink.   Very  few  sane  people  actually  like
  210. blinking text so using foreground colors above 7 is not recommended.
  211.  
  212. "/MONO" (or "/-COLOR") turns off the colors.  Same thing as "/COLOR=070".
  213.  
  214. "/Q" turns off the file-by-file status messages.  It also turns off  a  detailed
  215. summary table that shows up after the program is finished.
  216.  
  217.  
  218. DIRCOMP.DOC                          5                         Revised: 09-16-96
  219.  
  220. "/Iinitfile" says to read an initialization file with the file name  "initfile".
  221. The file specification *must* contain a period.  Initfiles are described in  the
  222. BRUCEINI.DOC file.  Initially defaults to "/IDIRCOMP.INI".
  223.  
  224. "/-I" (or "/INULL") says to skip loading the initialization file.
  225.  
  226. "/?" or "/HELP" or "HELP" shows you the syntax for the command.
  227.  
  228. Samples:        DIRCOMP J:\EBBNEW\DATA E:\EBBNEW\DATA /KILL /FC:\DATA.EBB
  229.                 DIRCOMP E:\EBBNEW\DATA J:\EBBNEW\DATA /UPDATE /KILL /NET
  230.                 DIRCOMP C:\TC D:\TEMP /UPDATE /KILL /ATTR=RHS /S
  231.  
  232.  
  233. Return codes:
  234.  
  235. DIRCOMP returns the following ERRORLEVEL codes:
  236.  
  237.         0 = no problems
  238.       249 = /UPDATE but none copied/moved/deleted
  239.       250 = operation aborted by pressing Escape
  240.       251 = other problems
  241.       253 = no files found in subdirectories
  242.       254 = could not find a decent temporary output subdirectory
  243.       255 = syntax problems, or /? requested
  244.  
  245.  
  246. Author:
  247.  
  248. This program was written by Bruce Guthrie of Wayne Software.  It is free for use
  249. and redistribution provided relevant documentation is kept with the program,  no
  250. changes are made to the program or documentation, and it  is  not  bundled  with
  251. commercial programs or charged for separately.  People who need to bundle it  in
  252. for-sale packages must pay a $50 registration fee to  "Wayne  Software"  at  the
  253. following address.
  254.  
  255. Additional information about this and other Wayne Software programs can be found
  256. in the file BRUCEymm.DOC which should be included  in  the  original  ZIP  file.
  257. ("ymm" is replaced by the last digit of the year and the two digit month of  the
  258. release.  BRUCE512.DOC came out in December 1995.  This same  naming  convention
  259. is used in naming the ZIP file that this program was included in.) Comments  and
  260. suggestions can also be sent to:
  261.  
  262.                 Bruce Guthrie
  263.                 Wayne Software
  264.                 113 Sheffield St.
  265.                 Silver Spring, MD 20910
  266.  
  267.                 fax: (301) 588-8986
  268.                 e-mail: bguthrie@nmaa.org
  269.                 http://hjs.geol.uib.no/guthrie/
  270.  
  271. See BRUCEymm.DOC file for revision history.
  272.  
  273. Please provide an Internet e-mail address on all correspondence.
  274.  
  275. 
  276.